﻿#region namespaces

using System;
using ZOIL.DataModel;

#endregion

namespace ZOIL.DataBackend.BaseX
{
    public class DatabaseObjectActionEventArgs : EventArgs
    {
        public readonly IPersistable DatabasePersistable;
        public readonly IVisualProperties VisualProperties;

        public DatabaseObjectActionEventArgs(IPersistable databasePersistable, IVisualProperties visualProperties)
        {
            DatabasePersistable = databasePersistable;
            VisualProperties = visualProperties;
        }

        public Type DatabaseObjectType
        {
            get { return DatabasePersistable.GetType(); }
        }

        public Type VisualPropertiesType
        {
            get { return VisualProperties.GetType(); }
        }

        public Tuple<IPersistable, IVisualProperties> ToTuple()
        {
            return Tuple.Create(DatabasePersistable, VisualProperties);
        }
    }
}